// if else
if (1 == 2) {
    println("1=2")
} else {
    println("1!=2")
}

val a = 10
if (a <= 5) {
    println(1)
} else if(a <= 10) {
    println(2)
} else if(a <= 15) {
    println(3)
} else {
    println("NNNNNN")
}

val x = if (a > 5) 1 else 2
println(math.max(1,2))


// 循环
var a = 1
val res: Unit = while (a <= 10) {
    println(a)
    a += 1
    a // 返回值： 方法体最后一行是返回值
}
println(res)

var b = 1
do {
    println(b)
    b += 1
} while (b <= 10)